const fs = require('fs');
const path = require('path');

// 读取环境变量的文件把它转化成对象

module.exports = (file) => { // flie为文件路径
    let fileName = path.join(__dirname, file);
    let data = fs.readFileSync(fileName, {
        encoding: 'utf8'
    })
    return JSON.parse(data)
}